<text>Building list of installed schemes...</text>
</content>
<name></name>
<script>on checkSchemes wID,objectNumglobal viewOptionsif there is a window "Progress" then close window "Progress"if objectNum is 1 thenPrepareTocheck selectedelse if objectNum is 2 then doMenu "Quit HyperCard"else if objectNum is 3 or objectNum is 8 then showHelpelse if objectNum is 4 then optionsWindowelse if objectNum is 16 thenbuildListelse if objectNum is 13 thenPrepareTocheck allelse if objectNum is 14 thenPrepareTocheck OneSchemeelse if objectNum is 15 thenif mwGet("selection",wID,15) is not "" then mwSet "disabled",wID,1,falseelsemwSet "disabled",wID,1,trueend ifelse if objectNum is 18 thenselectFolderelse if objectNum is 20 thenPrepareTocheck newelse if objectNum is 12 and the optionKey is down then menu switchend checkSchemeson searchOptions wID,objectNumglobal continueSearch,Accents1,Accents2,setBitsput true into continuesearchput "" into addresif objectNum is 1 thenglobal minRes,BeBoxMin,WDEFmin,SCprefsput resText("TEXT",144) into Accents1put resText("TEXT",145) into Accents2put resText("TEXT",137) & return & resText("TEXT",130) into minResput resText("TEXT",136) & return & resText("TEXT",130) into BeBoxMinput "" into WDEFMinif mwGet(hilite,wID,5) thenput return & resText("TEXT",142) after addResput true into item 1 of SCprefselseput false into item 1 of SCprefsend ifif mwGet(hilite,wID,6) thenput return & resText("TEXT",138) after addResput true into item 2 of SCprefsif mwGet(hilite,wID,8) thenput return & resText("TEXT",139) after addResend ifelseput false into item 2 of SCprefsend ifif mwGet(hilite,wID,4) then put false into item 8 of scPrefselse put "true" into item 8 of scPrefsif mwGet(hilite,wID,8) then put true into item 3 of scPrefselse put "false" into item 3 of scPrefsif mwGet(hilite,wID,7) thenput return & resText("TEXT",140) after addResput true into item 4 of SCprefsif mwGet(hilite,wID,8) thenput return & resText("TEXT",141) after addResend ifelseput false into item 4 of SCprefsend ifif mwGet(hilite,wID,13) thenput return & resText("TEXT",143) after addResput true into item 5 of SCprefselseput false into item 5 of SCprefsend ifput addres after minResput addres after BeBoxMinput addres after WDEFMinif mwGet(hilite,wID,10) then put true into item 6 of SCprefselse put false into item 6 of SCprefsput findFolder(P) & "SchemeChecker prefs" into SCprefsFileopen file scPrefsFileclose file scPrefsFileput mwGet("Hilite",wID,15) into setBitsTextRes setBits,SCpf,128,scPrefsFile,truesetMenuGray falseMegaModalize WID,falseelse if objectNum is 3 thensetMenuGray falseMegaModalize WID,falseput false into continueSearchelse if objectNum is 6 or objectNum is 7 thenmwSet "disabled",wID,8,falseelse if objectNum is 4 then mwSet "disabled",wID,8,trueend searchOptionson kalVers wid,objectNumif objectNum is 4 thenput word 1 of line (item 2 of line 1 of (mwGet("selection",wID,4))) of mwGet("Text",wid,4) into theTextif theText ≠ "" thenmwSet "Text",wID,3,theTextelsemwSet "selection",wID,4,(the number of lines of (mwGet("Text",wid,4)))+1kalVers wID,4end ifelse if objectNum is 1 thenput mwGet("Text",wid,3) into enteredVersif char 1 of enteredVers is "$" then delete char 1 of enteredVersif "." is in enteredVers then repeat until "." is not in enteredVersput "" into char offset(".",enteredVers) of enteredVersend repeatput char 1 to 2 of enteredVers into enteredVersput ResText(SCve,128) into acceptversif enteredVers is a number thenif enteredVers is not in acceptVers thenbeepanswer "The entered value (" & mwGet("Text",wid,3) & ") is not in the list" && ¬"of supported values." & return & return & "Are you sure you want to set " & ¬"this scheme's minimum Kaleidoscope version to the entered value?" with "Yes" or "Don't Change"if it is "Don't Change" thensetMenuGray falseMegaModalize WID,falseexit kalVersend ifend ifput mwGet("Text",wid,8) into theFileput ResText(Colr,129,theFile,"hex") into ColrResput enteredVers into char 7 to 8 of ColrResTextRes ColrRes,Colr,129,theFile,true,"hex"elsebeepanswer "The entered value (" & mwGet("Text",wid,3) & ") is not a number." & ¬return & return & "Please enter a correct value." with "OK"exit kalVersend ifsetMenuGray falseMegaModalize WID,falseelse if objectNum is 2 thensetMenuGray falseMegaModalize WID,falseend ifend kalVerson resultWin wID,objectNumglobal schemeResults,resultPathsif objectNum is 1 thenset cursor to watchput mwGet("selection",wID,1) into selSchemeput mwGet("text",wID,1) into schemeListset itemDelimiter to "," -- just in caseput line (item 2 of line 1 of selScheme) of schemeList into theSchemeput item 2 of line 1 of selScheme into selLinemwSet "Visible",wID,3,falseif not mwGet("Visible",wID,6) thenmwSet "Visible",wID,15,truemwSet "Visible",wID,6,trueend ifset itemDelimiter to numToChar(20)put item ((selLine)*4) of schemeResults into furtherInfoif the number of items of furtherInfo is 1 then put furtherInfo into furtherInfoTextput the number of lines in item ((selLine)*4)-3 of schemeResults into liste_1put the number of lines in item ((selLine)*4)-2 of schemeResults into liste_2put the number of lines in item ((selLine)*4)-1 of schemeResults into liste_3set itemDelimiter to ","if selScheme is "" thenmwSet "visible",wID,10,falsemwSet "Visible",wID,20,falsemwSet "Visible",wID,19,falsemwSet "Visible",wID,18,falsemwSet "Visible",wID,17,falsemwSet "Visible",wID,16,falsemwSet "Visible",wID,15,falsemwSet "Visible",wID,6,falsemwSet "Visible",wID,4,falsemwSet "Visible",wID,5,falsemwSet "Visible",wID,3,falsemwSet "Visible",wID,2,falsemwSet text,wID,14,""mwSet text,wID,11,""mwSet text,wID,12,""mwSet text,wID,13,""else if liste_1+liste_2+liste_3=0 thenmwSet "Hilite",wID,18,falsemwSet "Hilite",wID,17,falsemwSet "Hilite",wID,16,falsemwSet "visible",wID,18,falsemwSet "visible",wID,17,falsemwSet "visible",wID,16,falsemwSet "visible",wID,10,falseif the number of items of furtherInfo is 1 thenmwSet text,wID,14,""mwSet text,wID,11," Error - scheme not checked."mwSet text,wID,12,""mwSet text,wID,13,""elsemwSet "visible",wID,10,trueend ifresultWin wID,15elsemwSet text,wID,14,"SchemeChecker discovered these errors in scheme" & return & quote & theScheme & quote & ":"if liste_1 is not "1" then mwSet text,wID,11,"•" && (liste_1) && "resources with bits set wrongly"else mwSet text,wID,11,"•" && (liste_1) && "resource with bits set wrongly"if liste_2 is not "1" then mwSet text,wID,12,"•" && (liste_2) && "resources are missing"else mwSet text,wID,12,"•" && (liste_2) && "resource is missing"if the number of characters of liste_3 > "2" then mwSet text,wID,13,"•" && (liste_3) && "resources are prob'ly not needed"else if liste_3 is not "1" then mwSet text,wID,13,"•" && (liste_3) && "resources are probably not needed"else mwSet text,wID,13,"•" && (liste_3) && "resource is probably not needed"mwSet "visible",wID,10,falseif mwGet ("Hilite",wID,18) then put 18 into liteelse if mwGet ("Hilite",wID,17) then put 17 into liteelse if mwGet ("Hilite",wID,16) then put 16 into liteelseput 15 into liteend ifif liste_1 = 0 thenmwSet "Visible",wID,18,falseif lite is 18 thenput "15" into liteend ifelsemwSet "Visible",wID,18,trueend ifif liste_2 = 0 thenmwSet "Visible",wID,17,falseif lite is 17 thenput "15" into liteend ifelsemwSet "Visible",wID,17,trueend ifif liste_3 = 0 thenmwSet "Visible",wID,16,falseif lite is 16 thenput "15" into liteend ifelsemwSet "Visible",wID,16,trueend ifresultWin wID,liteend ifelse if objectNum is 8 then-- update prefs fileput mwGet(text,wID,1) into checkedListput findFolder(P) & "SchemeChecker prefs" into SCprefsFileopen file scPrefsFileread from file scPrefsFile for 70000put it into listFromPrefsclose file scPrefsFileset the itemDelimiter to ","put "" into placeAtEndrepeat with i=1 to the number of lines of checkedListif i mod 5 = 0 then set cursor to busyput line i of resultPaths into filePathset the itemDelimiter to ":"put last item of filePath into schemeNameset the itemDelimiter to ","put getFInfo(filePath) into fileInfoput 1+(item 1 of search(listFromPrefs,return & schemeName,false)) into resultLineput (the number of items of line ResultLine of listFromPrefs)-2 into numItemsif item 1 to numItems of line ResultLine of listFromPrefs = schemeName thenput schemeName & "," & item 5 to 6 of fileInfo into line resultLine of listFromPrefsput "-" into itelse put "" into itif it is empty thenput return & schemeName & "," & item 5 to 6 of fileInfo after placeAtEndend ifend repeatif listFromPrefs is "" and char 1 of placeAtEnd is return then delete char 1 of placeAtEndopen file scPrefsFilewrite listFromPrefs & placeAtEnd to file scPrefsFileclose file scPrefsFileset the getClosePrm of window id wID to falseclose window id widput "" into schemeResults --clean upglobal resultIDput "" into resultIDput "" into resultPathselse if objectNum is 3 thenfixResource wIDelse if objectNum is 15 thenset itemDelimiter to ","put item 2 of line 1 of (mwGet("selection",wID,1)) into selLineif selLine is "" thenmwSet "Text",wID,19,""exit resultWinend ifif not mwGet("Visible",wID,10) thenmwSet "Hilite",wID,18,falsemwSet "Hilite",wID,17,falsemwSet "Hilite",wID,16,falseend ifmwSet "PictID",wID,15,1003set itemdelimiter to ":"put last item of (line (selLine) of resultPaths) into theSchemeset itemDelimiter to numToChar(20)put item ((selLine)*4) of schemeResults into furtherInfoput "" into furtherInfoTextset itemDelimiter to ","if the number of items of furtherInfo is 1 then put furtherInfo & " The scheme is probably being used by another application." into furtherInfoTextelseif item 4 of furtherInfo is not "" thenput "Version:" && item 4 of furtherInfo & return after furtherInfoTextelse put "This scheme is missing a vers ID 1 resource." & return after furterInfoTextif item 9 of furtherInfo is not "" thenput item 9 of furtherInfo into theversif theVers is a number thenif theVers < 15 thenput "." after char 1 of theVersput "Illegal entry (" & theVers & ")" into theVerselseput "." after char 1 of theVersend ifelse put "Illegal entry ($" & theVers & ")" into theVersput "Min. Kaleidoscope version: " & theVers & return & return after furtherInfoTextelse put return & return after furtherInfoTextif item 2 of furtherInfo is "true" thenif item 7 of furtherInfo is "BeBox" thenif item 8 of furtherInfo is "unknown" then put "an unknown version" into BeVerselse put "version " & item 8 of furtherInfo into BeVersput "This scheme uses " & beVers & " of the BeBox WDEF." ¬& return & return after furtherInfoTextelse if item 7 of furtherInfo is "Other" thenput "This scheme contains a WDEF resource which SchemeChecker" & ¬" does not support." & return & return after furtherInfoTextend ifend ifif item 3 of furtherInfo is "true" thenput "This scheme has a info dialog." & return & return after furtherInfoTextelse if item 3 of furtherInfo is "false" then put "This scheme has no info dialog. " & ¬"If you want your scheme to have a info dialog, you must add the DLOG/DITL ID -14320 " & ¬"resources." & return & return after furtherInfoTextif item 10 of furtherInfo is not "" thenput "resource" into resif item 10 of furtherInfo ≠ 1 thenput "s" after resput "was" into was_wereelse put "were" into was_wereput item 10 of furtherInfo && res & " with unset bits " & ¬was_were & " fixed." & return & return after furtherInfoTextelse if word 1 of item 1 of furtherinfo is "This" then put furtherinfo into furtherinfoTextif item 5 of furtherInfo is "true" and theScheme is in ResText(SCga,128) thenput "This scheme was made by the authors of Kaleidoscope." & return & return after furtherInfoTextelse if item 5 of furtherInfo is "true" and theScheme is not in ResText(SCga,128) then put "The " & ¬"version info for this scheme is not correct. It says it's made by the authors of " & ¬"Kaleidoscope, but it is not one of their schemes." & return & return after furtherInfoTextif item 6 of furtherInfo is "true" then put "This scheme has a Finder double-click string." & ¬return & return after furtherInfoTextrepeat until last char of furtherInfoText is not returndelete last char of furtherInfoTextend repeatend ifmwSet text,wID,2,furtherInfoTextmwSet "Visible",wID,2,trueelse if objectNum is 18 thenif mwGet("hilite",wID,18) is false thenmwSet "hilite",wID,18,trueexit resultWinend ifset cursor to watchput mwGet("selection",wID,1) into selSchemeput item 2 of line 1 of selScheme into selLineif selScheme is "" thenmwSet "Text",wID,19,""exit resultWinend ifput mwGet("text",wID,1) into schemeListput line (item 2 of line 1 of selScheme) of schemeList into theSchemeset itemDelimiter to numToChar(20)put item ((selLine)*4)-3 of schemeResults into liste_1set itemDelimiter to numToChar(15)mwSet "Visible",wID,2,falsemwSet text,wID,19,liste_1get megaWindow("Set","Selection",wID,19,"1,1")set itemDelimiter to ","mwSet "Visible",wID,20,truemwSet "Visible",wID,19,truemwSet "Visible",wID,4,truemwSet "Visible",wID,5,trueif the number of lines in liste_1 ≠ 0 thenmwSet "disabled",wID,3,falseelsemwSet "disabled",wID,3,trueend ifmwSet "Visible",wID,3,truemwSet "Hilite",wID,16,falsemwSet "Hilite",wID,17,falsemwSet "PictID",wID,15,1002resultWin wID,19else if objectNum is 17 thenif mwGet("hilite",wID,17) is false thenmwSet "hilite",wID,17,trueexit resultWinend ifset cursor to watchput mwGet("selection",wID,1) into selSchemeput item 2 of line 1 of selScheme into selLineif selScheme is "" thenmwSet "Text",wID,19,""exit resultWinend ifput mwGet("text",wID,1) into schemeListput line (item 2 of line 1 of selScheme) of schemeList into theSchemeset itemDelimiter to numToChar(20)put item ((selLine)*4)-2 of schemeResults into liste_1set itemDelimiter to numToChar(15)mwSet "Visible",wID,2,falsemwSet text,wID,19,liste_1get megaWindow("Set","Selection",wID,19,"1,1")set itemDelimiter to ","mwSet "Visible",wID,20,truemwSet "Visible",wID,19,truemwSet "Visible",wID,4,truemwSet "Visible",wID,5,truemwSet "Visible",wID,3,falsemwSet "Hilite",wID,18,falsemwSet "Hilite",wID,16,falsemwSet "PictID",wID,15,1002resultWin wID,19else if objectNum is 16 thenif mwGet("hilite",wID,16) is false thenmwSet "hilite",wID,16,trueexit resultWinend ifset cursor to watchput mwGet("selection",wID,1) into selSchemeput item 2 of line 1 of selScheme into selLineif selScheme is "" thenmwSet "Text",wID,19,""exit resultWinend ifput mwGet("text",wID,1) into schemeListput line (item 2 of line 1 of selScheme) of schemeList into theSchemeset itemDelimiter to numToChar(20)put item ((selLine)*4)-1 of schemeResults into liste_1set itemDelimiter to numToChar(15)mwSet "Visible",wID,2,falsemwSet text,wID,19,liste_1get megaWindow("Set","Selection",wID,19,"1,1")set itemDelimiter to ","mwSet "Visible",wID,20,truemwSet "Visible",wID,19,truemwSet "Visible",wID,4,truemwSet "Visible",wID,5,truemwSet "Visible",wID,3,falsemwSet "Hilite",wID,17,falsemwSet "Hilite",wID,18,falsemwSet "PictID",wID,15,1002resultWin wID,19else if objectNum is 9 thensaveResultselse if objectNum is 19 thenput line (item 2 of mwGet("Selection",wID,19)) of mwGet("Text",wID,19) into selectedResput item 2 of line 1 of (mwGet("selection",wID,1)) into selLineset itemDelimiter to numToChar(15)put item 1 of selectedRes into selectedResset itemDelimiter to numToChar(20)put item (selLine*4) of schemeResults into furtherInfoset itemDelimiter to ","if last char of selectedRes is "," then delete last char of selectedResmwSet "UpIcon",wID,20,cicnID(item 1 of selectedRes)if selectedRes is not "" thenput item 1 to 2 of selectedRes & ": " & description(selectedRes) into resInfoif mwGet("hilite",wid,18) is true then -- missingglobal SPRes,SResif item 1 to 2 of selectedRes is in SPRes thenput return & return & "This resource needs the System Heap and Purgeable bits set." after resInfoelse if item 1 to 2 of selectedRes is in SRes thenput return & return & "This resource needs the System Heap bit set." after resInfoend ifelse if mwGet("hilite",wid,17) is true then -- missingif "(mixed state)" is not in resInfo thenput return & return & "You should add this resource to the scheme." after resInfoend ifelse if mwGet("hilite",wid,16) is true then -- not neededif item 1 of selectedRes is "PICT" thenput item 1 to 2 of selectedRes & ": This PICT resource has an illegal ID number. " & ¬"It should be given an ID number in the range -14320 through -14304 (to avoid " & ¬"conflicting with other applications)." into resInfoelse if item 1 of selectedRes is "ppat" thenput item 1 to 2 of selectedRes & ": This pattern resource is probably used by Kaleidoscope 2.0. " & ¬"DO NOT delete this resource unless you are absolutely sure it's not used!" into resInfoelseglobal dontIncludeput item 1 to 2 of selectedRes & ": -" into resInfoif item 1 to 2 of selectedRes & return is in dontInclude thenput return & return & "This is one of the resources you should not override! Remove this resource from your scheme immediately!" after resInfoelse if item 1 of selectedRes is in "cinf,wnd#" and item 9 of furtherinfo ≥ 20 thenput return & return & "This K 2.0 resource is missing the accompanying cicn resource. Either remove this resource, or add the cicn resource with the same ID." after resinfoelseput return & return & "This resource is probably not used, and can be removed from the scheme." after resInfoend ifend ifend ifelse put "" into resInfomwSet "Text",wID,4,resInfoend ifend resultWinon openMainWinglobal mainIDshowWindowselectFolder true -- build list of schemesshow window id mainIDend openMainWinon saveResultsglobal resultID,resultPathsask file "Save report as:" with "Scheme Checker Report"if it is "" or the result is "Cancel" then exit saveResultsset cursor to watchput it into filePathput "" into saveTextput mwGet("Text",resultID,1) into schemeListglobal schemeResultsput "SchemeChecker report " & the short date & return & "---------------" & return into saveTextput "Be aware of the following:" & return & ¬" - Some of the resources reported as ‘not needed’ may just need to be given a different ID" && ¬"and should not be removed unless you know they really are superfluous." & return & return after saveTextrepeat with i = 1 to number of lines in schemeListif i mod 10 = 0 then set cursor to busyset itemDelimiter to numToChar(20)put item (i*4)-3 of schemeResults into liste_1put item (i*4)-2 of schemeResults into liste_2put item (i*4)-1 of schemeResults into liste_3put item (i*4) of schemeResults into furtherInfoset itemDelimiter to ","put "---------------" & return & line i of schemeList & return & ¬"File path: <" & line i of resultPaths & ">" & return after saveTextif item 2 of furtherInfo is "true" thenif item 7 of furtherInfo is "BeBox" thenif item 8 of furtherInfo is "unknown" then put "an unknown version" into BeVerselse put "version " & item 8 of furtherInfo into BeVersput "This scheme uses " & beVers & " of the BeBox WDEF." ¬& return after saveTextelse if item 7 of furtherInfo is "Other" thenput "This scheme contains a WDEF resource which SchemeChecker" & ¬" does not support." & return after saveTextend ifend if-- if liste_1 is not "" then put return & "Resources with bits set incorrectly (" & the number of lines in liste_1 & "):" & return after saveTextif liste_1 is not "" then put return & "Resources with bits set incorrectly (" & the number of lines in liste_1 & "):" & return & liste_1 & return after saveTextif liste_2 is not "" then put return & "Missing resources (" & the number of lines in liste_2 & "):" & return & liste_2 & return after saveTextif liste_3 is not "" then put return & "Resources probably not needed (" & the number of lines in liste_3 & "):" & return & liste_3 & return after saveTextput return after saveTextend repeatopen file filePathwrite saveText to file filePathclose file filePathend saveResultson showHelpglobal helpIDif there is not a window id helpID thenset cursor to watchput "list 234,353,28,491,274,vert,true,false,one,0,Geneva,9" & return ¬& "textEdit 1234,10,28,343,274,true,true,0,12" & return ¬& "staticText 23,353,10,480,26,Geneva,10 B,Topics" & return ¬& "staticText 123,11,11,345,26,Geneva,10 B,Introduction" into ObjectListput screenSenter() into screenMiddleput item 1 of screenMiddle-250 & "," & item 2 of screenMiddle-141 & ¬"," & item 1 of screenMiddle+250 & "," & item 2 of screenMiddle+142 & "G" into TheRectput MegaWindow("New","SchemeChecker help",theRect,ObjectList, ¬false,"499,250,16000,16000","normal","helpWin","56360,56360,56360") into HelpIDget megaWindow("TextFromRes",HelpID,2,500)mwSet "LockTyping",HelpID,2,truemwSet "Text",HelpID,1,helpList()mwSet "Text",HelpID,4,line 1 of longHelpList()get megaWindow("Set","Selection",HelpID,1,"1,1")end ifshow window id helpIDend showHelpon helpWin wID,objectNumif objectNum is 1 thenput item 2 of mwGet("Selection",wID,1) into lineSelectedget megaWindow("TextFromRes",wID,2,499+lineSelected)mwSet "text",wID,4,line lineselected of LongHelpList()end ifend helpWinfunction helpListreturn "Information" & return & ¬"Quick introduction" & return & ¬"The main window" & return & ¬"The result window" & return & ¬" Resources and bits" & return & ¬" Missing resources" & return & ¬" Resources not needed" & return & ¬"Version history" & return & ¬"Externals I used" & return & ¬"Acknowledgements"end helpListfunction longhelpListreturn "Information About SchemeChecker" & return & ¬"Quick Introduction to SchemeChecker" & return & ¬"About the main window" & return & ¬"About the result window" & return & ¬"Resources with incorrectly set bits" & return & ¬"Missing resources" & return & ¬"Resources probably not needed" & return & ¬"Version history" & return & ¬"Externals (XCMDs and XFCNs) used in SchemeChecker" & return & ¬"Acknowledgements"end longhelpListfunction cicnID resput "150" into useIDif res is "actb" then put "129" into useIDelse if res is "cicn" then put "130" into useIDelse if res is "dctb" then put "132" into useIDelse if res is "ICN#" then put "133" into useIDelse if res is "icl4" then put "134" into useIDelse if res is "icl8" then put "134" into useIDelse if res is "ics#" then put "135" into useIDelse if res is "ics4" then put "136" into useIDelse if res is "ics8" then put "136" into useIDelse if res is "ppat" then put "138" into useIDelse if res is "snd " then put "139" into useIDelse if res is "clut" then put "131" into useIDelse if res is "PICT" then put "137" into useIDelse if res is "WDEF" then put "128" into useIDelse if res is "Colr" then put "128" into useIDelse if res is "DITL" then put "140" into useIDelse if res is "DLOG" then put "141" into useIDelse if res is "STR " then put "144" into useIDelse if res is "TMPL" then put "143" into useIDelse if res is "vers" then put "142" into useIDelse if res is "crsr" then put "145" into useIDelse put "128" into useIDreturn useIDend cicnIDfunction description restypeglobal allResif resType is in allres thenput offset(resType,Allres)+number of chars in restype+1 into startCharif char startChar-1 of allRes ≠ return then put char startChar to offset(return,char startChar to 70000 of Allres)+startChar-2 of allres into returnInfoelseput "-" into returnInfoend ifelse put "-" into returnInfoif returnInfo is "" then put "-" into returnInforeturn returnInfoend descriptionon fixResource wIDglobal SPRes,SRes,resultID,schemeResults,resultPathsput item 2 of line 1 of (mwGet("selection",wID,1)) into selLineset itemDelimiter to ","put line (selLine) of resultPaths into filePathput mwGet("text",wID,19) into ResListset cursor to watchrepeat with i = 1 to the number of lines in resListset itemDelimiter to numToChar(15)put item 1 of line i of ResList into ResLineset itemDelimiter to ","put item 1 to 2 of ResLine into theResif theRes is in SPRes then put "SU" into whatToSetelse if theRes is in Sres then put "S" into whatToSetelse put "" into whatToSetput theRes & "," & whatToSet into line i of resBitsend repeatget ResSet(filePath,resBits)if it ≠ "" then answer itelseset itemDelimiter to numToChar(15)mwSet "Text",resultID,19,""set itemDelimiter to numToChar(20)put "" into item ((selLine)*4)-3 of schemeResultsmwSet "text",wID,11,"• 0 resources with bits set wrongly"set itemDelimiter to ","mwSet "disabled",wID,3,trueend ifend fixResource</script>